package main

import "fmt"

func main()  {
	s:=make([]string,3)
	fmt.Println("emp:",s)

	s[0] = "a"
	s[1] = "b"
	s[2] = "c"

	fmt.Println(s,s[2],len(s))

	s = append(s,"d","e","f")
	fmt.Println(s)

	c := make([]string, len(s))
	copy(c,s)
	fmt.Println(c)

	// c = append(c,"h")
	// fmt.Println(c,s)

	t:=[]string{"g","h","i"}
	fmt.Println("dcl:",t)

	twoD := make([][]int, 3)
	for i := 0; i < 3; i++ {
		innerLen := i+1
		twoD[i] = make([]int,innerLen)
		for j := 0; j < innerLen; j++ {
			twoD[i][j] = i+j
		}
	}
	fmt.Println("2d:",twoD)
}